package com.kevin.enums;

public enum AlterOp {
	NONE(0,"不修改"),
	ADDORMODIFY(1,"添加或修改"),
	DROP(2,"删除列"),
	RENAME(4,"重命名列");
	
	private Integer key;
	private String des;
	
	AlterOp(Integer key,String des) {
		this.key = key;
		this.des = des;
	}
	
    public static AlterOp valueofKey(Integer key) {
        for (AlterOp op : AlterOp.values()) {
            if (op.key.equals(key)) {
                return op;
            }
        }
        throw new IllegalArgumentException("No element matches " + key);
    }
    
    public Integer getKey() {
        return key;
    }
    
    public String getDes() {
        return des;
    }
}
